<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body,#app{
            width: 100%;
            height: 100%;
        }

        img{
            width: 300px;
            height: 250px;
        }

        b{
            background: pink;
            padding: 10px;
            margin: 10px;
        }
        .on{
            background: orange;
        }
    </style>
</head>
<body>
    <div id="app">
        <img alt="" v-for="(item,index) in list" :src="item" v-show="activeIndex==index">
        <div>
            <b v-for="(item,index) in list " @click="activeIndex=index" class="{on:activeIndex==index}">{{index}}</b>
        </div>
    </div>
</body>
<script src="./vue.js"></script>
<script>
    const vue=new Vue({
        el:'#app',
        data:{
            activeIndex:0,
            list:[
                "./img/QQ图片20210617172341.jpg",
                "./img/QQ图片20210617172347.jpg",
                "./img/QQ图片20210617172352.jpg"
            ]
        }
    })
</script>
</html>